﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="OnlineAuction.Home1" %>
<%@ OutputCache Duration="1" VaryByParam="none" %>
<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:DataList ID="dlAuction" runat="server"
        RepeatColumns="3" AlternatingItemStyle-VerticalAlign="Top" AlternatingItemStyle-HorizontalAlign="Center"
        CellPadding="2" CellSpacing="10">
        <ItemTemplate>
            <asp:Literal ID="lblAuID" Visible="false" Text='<%#Eval("AuctionID")%>' runat="server"></asp:Literal>
            <div style="float: left; width: 100%; height: auto; margin-left: -2px;" runat="server">
                <div class="dividerVertical" runat="server">
                </div>
                <div style="float: left; margin-top: 10px; margin-bottom: 10px; text-align: center;" runat="server">
                    
                    <%--<asp:ImageButton ID="img" runat="server" CommandArgument='<%# Eval("ItemImage1") +";"+ Eval("AuctionID") %>'
                         Height ="300px"  Width ="200px"/>--%>
                    <a href="Bid.aspx?AuctionID=<%#Eval("AuctionID")%>">
                        <img src="<%#Eval("ItemImage1")%>" width="200" height="250" /></a>
                    <br />
                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("ItemName") %>' Height="25px"></asp:Label>
                    <br />
                     Price:
                        <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("CurrentPrice") %>'></asp:Label>
                        
                    <div style="text-align: left">
                        
                        <img src="Images/clock.png" />
                        <a class="time-time">
                            <asp:Label ID="lblDays" Visible="false" runat="server" Text='<%# Eval("LeftDays") %>'></asp:Label>
                            <div id="lblDays<%#Eval("AuctionID")%>"></div>
                        </a>
                        days 
                        <a class="time-time">
                            <asp:Label ID="lblHours" Visible="false" runat="server" Text='<%# Eval("LeftHours") %>'></asp:Label>
                             <div id="lblHours<%#Eval("AuctionID")%>"></div>
                        </a>
                        :<a class="time-time">
                            <asp:Label ID="lblMinutes" Visible="false" runat="server"  Text='<%# Eval("LeftMinutes") %>'></asp:Label>
                             <div id="lblMinutes<%#Eval("AuctionID")%>"></div>
                        </a>
                        :<a class="time-time">
                            <asp:Label ID="lblSeconds" Visible="false" runat="server" Text='<%# Eval("LeftSeconds") %>'></asp:Label>
                             <div id="lblSeconds<%#Eval("AuctionID")%>"></div>
                        </a>
                        <br />
                    </div>
                </div>
            </div>
        </ItemTemplate>
        <AlternatingItemStyle HorizontalAlign="Center" VerticalAlign="Top"></AlternatingItemStyle>
        <FooterTemplate><asp:Label ID="lbEmpty" runat="server" Visible='<%#bool.Parse((dlAuction.Items.Count==0).ToString()) %>' Text="No item..."/></FooterTemplate>
    </asp:DataList>
    <%=CountDownScript()%>
    <div style="text-align: center">
        <cc1:CollectionPager ID="Cp" runat="server" SectionPadding="10" SliderSize="5" />
    </div>
</asp:Content>
